#ifndef __PLAYER_H
#define __PLAYER_H

#include "vector2f.h"
#include "multiSprite.h"
#include "ioManager.h"
#include "puppet.h"
#include "sound.h"

class Player : public Puppet
{
	public:
		Player(const string& n);
		~Player();

		void update();
		void draw();
		void handleMouseMotion();
		Sprite *getSprite();
		Sprite *getHook();
		void attachGrapple();
		void releaseGrapple();
		void addScore(int x);
		void addHealth(int x);
		int getScore();
		int getHealth();
		void toggleGodMode();
		bool didJump() { return jumped; }
		void shotHit();
		int getShotsFired();
		int getShotsHit();

		// Puppet functions
		void shoot();
		void shoot(Vector2f &dir);
		void left();
		void right();
		void jump();

	private:
		IOManager &io;
		string name;
		Sprite *sprite;
		Sprite *hook;
		bool grappling;
		int score;
		int health;
		float health_dx;
		int r,g,b;
		int playerDead;
		bool godMode;
		bool jumped;
		int shotsFired;
		int shotsHit;

		void updateHealth();

		Player(const Player&);
		void operator=(const Player&);

};

#endif // !__PLAYER_H
